<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var str = "hello js!";
			console.log(str.length);
			console.log(str.toLowerCase());
			console.log(str.toUpperCase());
			console.log(str.charAt(6));// j
			
			var str1 = "Hello js and java";
			console.log(str1.indexOf("js"));// 6
			console.log(str1.indexOf("JS"));// -1
			// 不管是从后往前还是从前往后找，这个字符串在字符串中
			// 索引位置是固定的
			console.log(str1.lastIndexOf("js"));// 6
			
			var str2 = "how are you doing today?";
			var array = str2.split(" ");
			console.log(array);// ["how", "are", "you", "doing", "today?"]
			console.log(array[2]);// you
			console.log("2:3:4:5".split(":"));// ["2", "3", "4", "5"]
		</script>
	</head>
	<body>
	</body>
</html>
